#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

#define N 100 
int main()
{
	int arr[N][N] = { 0 };
	int n = 0;
	scanf("%d", &n);
	int i = 0;
	for (i = 0; i < n; i++) {
		int j = 0;
		for (j = 0; j <= i; j++) {
			if (i == j || j == 0) {
				arr[i][j] = 1;
			}
			else
				arr[i][j] = 0;
		}
	}
	for (i = 0; i < n; i++) {
		int j = 0;
		for (j = 1; j < i; j++) {
			arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
		}
	}
	for (i = 0; i < n; i++) {
		int j = 0;
		for (j = 0; j <= i; j++) {
			printf("%d ",arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}